<?php
	class controller {
		function __construct()
		{
			$this->db =& $GLOBALS['DB'];
			$load = load_class();
			foreach ($load as $name => $instance)
			{
				debug("Setting controller::".$name." instance: ".$instance);
				$this->$name =& load_class($name);
			}
		}
		function load($name)
		{
			$libs = $this->library->load($name);
			foreach ( $libs as $key => $instance )
			{
				$this->$key = $instance;
			}
		}
		//
	}
?>